package com.gr.staffpm.tasks.dao;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import org.hibernate.Session;

import com.gr.staffpm.datatypes.Task;
import com.gr.staffpm.datatypes.TaskComment;
import com.gr.staffpm.datatypes.TaskImportance;
import com.gr.staffpm.datatypes.TaskStatus;
import com.gr.staffpm.datatypes.User;


public interface TaskDAO extends Serializable {

    public TaskComment getComment(int id);

    public List<TaskComment> getAllComments(Task task, String property, boolean ascending);

    public void addComment(TaskComment comment);

    public Task getTask(int id);

    public void updateTask(Task task);

    public List<TaskStatus> getAllStatuses();

    public List<TaskImportance> getAllImportances();

    public TaskStatus getInProgressStatus();

    public TaskStatus getOpenStatus();

    public TaskStatus getClosedStatus();

    public List<Task> getTasksDueBetween(Date startDate, Date endDate);

    public List<Task> getTasksDueOn(Date date);

    public List<Task> getUserTasks(User user);

    public List<Task> findTask(String query);

    public Session getSession();

    public void createIndex();

    public List<Task> getUnresolvedUserTasksBetweenDates(User user, Date start, Date end);

}
